if g<=120:
    print (i=0)
else:
    if g>120 and g<=140:
        print (i=500)
    if g>140:
        print (i=2000)
        